package com.sinothk.software.ui.base;

import ohos.aafwk.content.Intent;
import ohos.agp.components.Component;
import ohos.agp.window.service.Window;
import ohos.agp.window.service.WindowManager;

public class TitleBaseLightAbilitySlice extends BaseAbilitySlice {


    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        // 隐藏状态栏、设置状态栏和导航栏透明
        Window window = getWindow();
//        // 设置状态栏背景色
////        window.setStatusBarColor(Color.WHITE.getValue());
////        window.setStatusBarVisibility(Component.VISIBLE);;
////
        window.addFlags(
                WindowManager.LayoutConfig.MARK_TRANSLUCENT_STATUS // 上方通知栏
                        | WindowManager.LayoutConfig.MARK_TRANSLUCENT_NAVIGATION // 下方导航
        );
        // 隐藏导航栏（部分系统无效）
        window.setStatusBarVisibility(Component.HIDE);
    }
}
